<?='<?php $this->load->view(\'admin/public\');?>'?>
    <!--/sidebar-->
    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="<?=site_url('admin/indexc/index');?>">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name"><?=$dbname;?>管理</span></div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                <form action="<?=site_url('admin/'.$dbname.'c/lst');?>" method="get">
                    <table class="search-tab">
                        <?php foreach($fields as $v):
                            if($v['Field']=='id'){
                                continue;
                            }
                        ?><tr>
                            <th width="70"><?=$v['Comment'];?>:</th>
                            <td><input class="common-text" placeholder="<?=$v['Comment'];?>" name="<?=$v['Field'];?>" value="<?='<?=$this->input->get(\''.$v['Field'].'\');?>'?>" type="text"></td>
                        </tr>
                        <?php endforeach;?>
                        <tr>
                        <td></td><td><input class="btn btn-primary btn2" value="查询" type="submit"></td></tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                <div class="result-title">
                    <div class="result-list">
                        <a href="<?=site_url('admin/articlec/add');?>"><i class="icon-font"></i>新增<?=$dbname;?></a>
                        <a id="batchDel" href="javascript:void(0)"><i class="icon-font"></i>批量删除</a>
                        <a id="updateOrd" href="javascript:void(0)"><i class="icon-font"></i>更新排序</a>
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                           <?php foreach($fields as $v):?>
                                <td><?=$v['Comment'];?></td>
                           <?php endforeach;?>
                           <td>操作</td>
                        </tr>
                        <?='<?php foreach ($data->result(\'array\') as $v):?>'?>
                        <tr>
                        <?php foreach($fields as $v1):?>
                            <td><?='<?=$v[\''.$v1['Field'].'\'];?>'?></td>
                        <?php endforeach;?>
                            
                            <td>
                                <a class="link-update" href="<?='<?=site_url(\'admin/'.$dbname.'c/save/\'.$v[\'id\']);?>'?>">修改</a>
                                <a class="link-del" onclick="return confirm('确定要删除吗');" href="<?='<?=site_url(\'admin/'.$dbname.'c/delete/\'.$v[\'id\']);?>'?>">删除</a>
                            </td>
                        </tr>
                    <?='<?php endforeach;?>'?>
                    </table>
                    <!-- 分页 -->
                    <div class="list-page"> <?='<?=$page;?>'?></div>
                </div>
            </form>
        </div>
    </div>
    <!--/main-->
</div>
</body>
</html>